Author Topic: Clipping problem with OpenGL ES 1.x  (Read 3254 times)

chetanmrane

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Clipping problem with OpenGL ES 1.x
« on: March 20, 2013, 04:11:48 AM »
Hi,

I am facing clipping issue because of OpenGL ES 1.x.
The clipping works fine with OpenGL ES 2.0

So i dig lot into the forum and found one alternative to my problem...using secondary camera i can achieve scrolling without clipping

My doubt is ...

Can i add two different scrolling bars on single NGUI Page, i mean multiple View Camera ?

What would be the best practise?

Below is basic Ngui Structure i am following:


UIRoot 1
|-   2D Camera [NGUI Layer]
|-    Anchor
   |-    Panel A
      |-   Tile Sprite (with box collider and UIDrag Camera)
         |-   TopLeft
         |-   BottomRight
      
   |-    Panel B
      |-   Tile Sprite (with box collider and UIDrag Camera)
         |-   TopLeft
         |-   BottomRight
   
UIRoot 2
|-   View Camera (with UIDraggable camera and UIViewPort) [default layer]
|-   Anchor
   |-   Offset Panel (with UITable)
      |-   item
      |-   item
      |-   item

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Clipping problem with OpenGL ES 1.x
« Reply #1 on: March 20, 2013, 11:24:22 AM »
GLES 1.1 = no shaders.

No shaders = no clipping.

It's a simple as that.

chetanmrane

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: Clipping problem with OpenGL ES 1.x
« Reply #2 on: March 20, 2013, 01:26:29 PM »
Thanks ArenMook for your reply

agreed that GL 1 is not supporting clipping

but for that, i am using alternate soultion of secondary camera as in NGUI sample example

my q's is can i used multiple View Cameras for multiple scroller one is horizontal and other is vertical?

if so, then what would be the best heirachy to use it?