Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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  
  Just how bad is it to keep binding?  (Read 232 times)
0 Members and 1 Guest are viewing this topic.
Offline nhmllr

Senior Devvie


Medals: 1
Projects: 3


slow and steady...


« Posted 2014-06-23 18:28:07 »

I'm now about to embark on the painful process of converting a project I have made in Java2D to LWJGL. Before I start, I have one question.

How "bad" is it to keep binding new textures?

People keep saying how much faster it is to have multiple sprites in a single texture and draw different parts of that texture. But if I'm just making a 2D tile-based game, how necessary is that, really?

Will I run into problems with 60fps when I'm binding 100 textures each frame? 1,000? 10,000?

Is keeping everything in one texture really THAT worth it?
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 834
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2014-06-23 18:31:23 »

It is 'pretty bad' (YMMV). Focus on the game though, and solve performance issues when they occur.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline pitbuller
« Reply #2 - Posted 2014-06-23 19:04:43 »

It's necessary for batching.(or texture arrays)
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online trollwarrior1
« Reply #3 - Posted 2014-06-23 19:16:33 »

From what I know, most of the people who say that you need to reduce the number of .bind() think that, because they think that .bind() is expensive and you cannot use it a lot.

From my experience, reducing .bind() is the byproduct of reducing .draw() calls. That means that you want to send as much info to the GPU before calling .draw(), and the only way to achieve it is to put as much textures as possible into spritesheet/texturealtas
Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (73 views)
2014-11-26 15:22:04

toopeicgaming1999 (62 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (27 views)
2014-11-24 19:59:16

trollwarrior1 (40 views)
2014-11-22 12:13:56

xFryIx (78 views)
2014-11-13 12:34:49

digdugdiggy (56 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!