draw-list

Converting OpenGL draw lists to vertex arrays or VBOs

混江龙づ霸主 提交于 2019-12-08 01:34:42
问题 I'm trying to convert a program using draw lists, which are deprecated in OpenGL 3.0+, to use either vertex arrays or VBOs, but I'm not finding any examples of how to do the conversion. What's in the program now is this (happens to be Python, but really what I'm interested in is the appropriate OpenGL calls---it could just as well be C++, for example): dl = glGenLists(1) glNewList(dl, GL_COMPILE) glBindTexture(GL_TEXTURE_2D, texture) glBegin(GL_QUADS) glTexCoord2f(0, 0) glVertex2f(0, 0)

Converting OpenGL draw lists to vertex arrays or VBOs

六眼飞鱼酱① 提交于 2019-12-06 08:42:19
I'm trying to convert a program using draw lists, which are deprecated in OpenGL 3.0+, to use either vertex arrays or VBOs, but I'm not finding any examples of how to do the conversion. What's in the program now is this (happens to be Python, but really what I'm interested in is the appropriate OpenGL calls---it could just as well be C++, for example): dl = glGenLists(1) glNewList(dl, GL_COMPILE) glBindTexture(GL_TEXTURE_2D, texture) glBegin(GL_QUADS) glTexCoord2f(0, 0) glVertex2f(0, 0) glTexCoord2f(0, 1) glVertex2f(0, height) glTexCoord2f(1, 1) glVertex2f(width, height) glTexCoord2f(1, 0)

Displaying extra rows in a ListField

我是研究僧i 提交于 2019-12-04 02:35:19
问题 I'm trying to display an extra row at the top of a ListField - called "Add Item" and it almost works, but the very last row "Item 4" of my data is not displayed. How would you fix this issue? Please see my very simple test code MyList.java below: package mypackage; import java.util.*; import net.rim.device.api.collection.*; import net.rim.device.api.collection.util.*; import net.rim.device.api.system.*; import net.rim.device.api.ui.*; import net.rim.device.api.ui.component.*; import net.rim

Displaying extra rows in a ListField

和自甴很熟 提交于 2019-12-01 14:31:55
I'm trying to display an extra row at the top of a ListField - called "Add Item" and it almost works, but the very last row "Item 4" of my data is not displayed. How would you fix this issue? Please see my very simple test code MyList.java below: package mypackage; import java.util.*; import net.rim.device.api.collection.*; import net.rim.device.api.collection.util.*; import net.rim.device.api.system.*; import net.rim.device.api.ui.*; import net.rim.device.api.ui.component.*; import net.rim.device.api.ui.container.*; import net.rim.device.api.ui.decor.*; import net.rim.device.api.util.*;