Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (799)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (865)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Rendering a list of objects with the same mesh.  (Read 2165 times)
0 Members and 1 Guest are viewing this topic.
Offline Olo

JGO Coder


Medals: 15
Projects: 3
Exp: 5 years


Metaphysical solipsism AFFIRMS your existence


« Posted 2015-03-13 17:52:33 »

Hey.
Im using LibGDX + Ashley (ECS) and im trying to draw a list of tiles(entities) with one mesh (each tile has a texture offset and height - for scaling along the y axis).
The problem : nothing shows up on the screen and i have no idea why. I suppose i messed something up with OpenGL calls, as this is my first attempt at 3D.
If you have a better solution than what i have come up with, feel free to share it Smiley

TileRenderSystem.java
Test1.java (Loop Class)
tilesVertexShader.txt
tilesFragmentShader.txt
EDIT: defaultTileSet.png

-Can you fix it?
-No, I can't. But I can bypass it with one of these.
Offline Olo

JGO Coder


Medals: 15
Projects: 3
Exp: 5 years


Metaphysical solipsism AFFIRMS your existence


« Reply #1 - Posted 2015-03-13 19:40:23 »

Please help me :c Can you guys at least show me some way to do it? I don't need code, just some tips. All im trying to do is render a mesh multiple times, with different scale, and different "texture offset".

-Can you fix it?
-No, I can't. But I can bypass it with one of these.
Offline NegativeZero

JGO Kernel


Medals: 347
Exp: 1 month or less


Zero but not.


« Reply #2 - Posted 2015-03-14 01:15:21 »

When you have issues, the first thing you need to do is call
glGetError
, because if OpenGL is having a hissyfit because you're new to GL, you would never know without retrieving the error. Typically when you're not seeing anything, it's either because you're not actually rendering anything, you're not rendering anything onscreen (i.e your viewing frustrum is looking in the wrong direction), or OpenGL is having issues.

If you are having GL errors, you must definitely familiarize yourself with the core API reference. Making a post to StackOverflow saying "Opengl is returning error 1281" is pretty pointless because just about every OpenGL call you make can throw all of the errors for different reasons.

When GL throws an error follow these steps:
  • Identify which OpenGL call is throwing the error.
  • Go to the core API reference page for the call. At the bottom of each page, it defines the various reasons why an error may be thrown.
  • Fix your issue. If you are still having problems doing this, you may now post to StackOverflow or JGO or wherever you typically seek help.

When identifying which GL call is throwing the error, you can really do nothing but call
glGetError
after each GL call. Please note that you need to identify which is the earliest GL call that is throwing the error, because
glGetError
only holds the most recent error thrown, and if an error is thrown by one call, a later call may throw another error because of the first error, especially if there is a problem in setting a state (OpenGL is a very state based system).

Generally, GL throws one of three errors:
GL_INVALID_ENUM
(Error 0x500 / Error 1280)
GL_INVALID_VALUE
(Error 0x501 / Error 1281)
GL_INVALID_OPERATION
(Error 0x502 / Error 1282)

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Olo

JGO Coder


Medals: 15
Projects: 3
Exp: 5 years


Metaphysical solipsism AFFIRMS your existence


« Reply #3 - Posted 2015-03-14 02:00:46 »

Thanks Smiley i will let you know when i find the issue.

-Can you fix it?
-No, I can't. But I can bypass it with one of these.
Pages: [1]
  ignore  |  Print  
 
 

 
Riven (207 views)
2019-09-04 15:33:17

hadezbladez (4943 views)
2018-11-16 13:46:03

hadezbladez (1822 views)
2018-11-16 13:41:33

hadezbladez (5222 views)
2018-11-16 13:35:35

hadezbladez (1029 views)
2018-11-16 13:32:03

EgonOlsen (4406 views)
2018-06-10 19:43:48

EgonOlsen (5237 views)
2018-06-10 19:43:44

EgonOlsen (2978 views)
2018-06-10 19:43:20

DesertCoockie (3880 views)
2018-05-13 18:23:11

nelsongames (4312 views)
2018-04-24 18:15:36
Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!